﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Common.Factory;
using Common.Model;
using Common.Orm;
using PetaPoco;

namespace school.Areas.Manager.Controllers
{
    public class CommonController : Controller
    {
        public ActionResult Login()
        {
            return View();
        }
        [HttpPost]
        public ActionResult LoginAction(string username, string password, bool isChecked = false)
        {
            Cd_User isSuccess = Factory.UserService().Login(username, password);
            if (isSuccess == null)
            {
                return Json(new { state = "1", message = "用户名或者密码错误!" });
            }
            return View();
        }
    }
}
